package com.example.demo;

import com.example.demo.model.User;
import com.example.demo.service.UserService;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;

@SpringBootTest
public class UserServiceTests {
    @Resource
    private JdbcTemplate jdbcTemplate;
    @Autowired
    UserService userService;
    @Test
    void TestUser(){
        User user=new User();
        user.setUserName("小米");
        user.setStatus("离线");
        int i = userService.addUser(user);
        System.out.println("新增用户成功");
    }
}
